<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		color = 'red';

		function a() {
			color = 'blue';
		}

		function b() {
			alert(color);
		}
		a();
		b();
	</script>
</head>
<body>
	
</body>
</html>